#ifndef TRACKPLAYER_H
#define TRACKPLAYER_H

#include <QObject>
#include "midi.h"
#include <windows.h>
#include <mmsystem.h>
#include <QTimeLine>

#include <QDebug>
class trackplayer : public QObject
{
    Q_OBJECT
public:
    explicit trackplayer(QObject *parent = 0);
    trackplayer(track a,HMIDIOUT hdl);
    void playtrk();
    void setup(track a,HMIDIOUT hdl);
    void sleepplay();
    int usleep(long int);
    void timerplay();
signals:

public slots:
    void playNote();
    void playwithtimer(int);
private:
    vector<note> trackNotes;
    int cNote;
    int currentime;
    int lastevent;
    HMIDIOUT handle;
    QTimeLine *timeline;
};

#endif // TRACKPLAYER_H
